export const rankMap = {
  0: "未知",
  1: "先锋",
  2: "卫士",
  3: "中军",
  4: "统帅",
  5: "传奇",
  6: "万古流芳",
  7: "超凡入圣",
  8: "冠绝一世"
};

export const levelMap = {
  0: "",
  1: "Ⅰ",
  2: "Ⅱ",
  3: "Ⅲ",
  4: "Ⅳ",
  5: "Ⅴ",
  6: "Ⅵ",
  7: "Ⅶ"
};

export const heroMap = {
  1: {
    name: "敌法师",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/antimage_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/antimage_icon.png"
  },
  2: {
    name: "斧王",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/axe_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/axe_icon.png"
  },
  3: {
    name: "痛苦之源",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/bane_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/bane_icon.png"
  },
  4: {
    name: "血魔",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/bloodseeker_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/bloodseeker_icon.png"
  },
  5: {
    name: "水晶室女",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/crystal_maiden_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/crystal_maiden_icon.png"
  },
  6: {
    name: "卓尔游侠",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/drow_ranger_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/drow_ranger_icon.png"
  },
  7: {
    name: "撼地者",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/earthshaker_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/earthshaker_icon.png"
  },
  8: {
    name: "主宰",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/juggernaut_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/juggernaut_icon.png"
  },
  9: {
    name: "米拉娜",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/mirana_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/mirana_icon.png"
  },
  10: {
    name: "变体精灵",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/morphling_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/morphling_icon.png"
  },
  11: {
    name: "影魔",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/nevermore_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/nevermore_icon.png"
  },
  12: {
    name: "幻影长矛手",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/phantom_lancer_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/phantom_lancer_icon.png"
  },
  13: {
    name: "帕克",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/puck_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/puck_icon.png"
  },
  14: {
    name: "帕吉",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/pudge_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/pudge_icon.png"
  },
  15: {
    name: "剃刀",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/razor_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/razor_icon.png"
  },
  16: {
    name: "沙王",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/sand_king_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/sand_king_icon.png"
  },
  17: {
    name: "风暴之灵",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/storm_spirit_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/storm_spirit_icon.png"
  },
  18: {
    name: "斯温",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/sven_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/sven_icon.png"
  },
  19: {
    name: "小小",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/tiny_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/tiny_icon.png"
  },
  20: {
    name: "复仇之魂",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/vengefulspirit_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/vengefulspirit_icon.png"
  },
  21: {
    name: "风行者",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/windrunner_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/windrunner_icon.png"
  },
  22: {
    name: "宙斯",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/zuus_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/zuus_icon.png"
  },
  23: {
    name: "昆卡",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/kunkka_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/kunkka_icon.png"
  },
  25: {
    name: "丽娜",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/lina_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/lina_icon.png"
  },
  26: {
    name: "莱恩",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/lion_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/lion_icon.png"
  },
  27: {
    name: "暗影萨满",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/shadow_shaman_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/shadow_shaman_icon.png"
  },
  28: {
    name: "斯拉达",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/slardar_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/slardar_icon.png"
  },
  29: {
    name: "潮汐猎人",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/tidehunter_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/tidehunter_icon.png"
  },
  30: {
    name: "巫医",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/witch_doctor_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/witch_doctor_icon.png"
  },
  31: {
    name: "巫妖",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/lich_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/lich_icon.png"
  },
  32: {
    name: "力丸",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/riki_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/riki_icon.png"
  },
  33: {
    name: "谜团",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/enigma_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/enigma_icon.png"
  },
  34: {
    name: "地精修补匠",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/tinker_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/tinker_icon.png"
  },
  35: {
    name: "狙击手",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/sniper_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/sniper_icon.png"
  },
  36: {
    name: "瘟疫法师",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/necrolyte_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/necrolyte_icon.png"
  },
  37: {
    name: "术士",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/warlock_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/warlock_icon.png"
  },
  38: {
    name: "兽王",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/beastmaster_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/beastmaster_icon.png"
  },
  39: {
    name: "痛苦女王",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/queenofpain_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/queenofpain_icon.png"
  },
  40: {
    name: "剧毒术士",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/venomancer_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/venomancer_icon.png"
  },
  41: {
    name: "虚空假面",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/faceless_void_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/faceless_void_icon.png"
  },
  42: {
    name: "骷髅王",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/skeleton_king_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/skeleton_king_icon.png"
  },
  43: {
    name: "死亡先知",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/death_prophet_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/death_prophet_icon.png"
  },
  44: {
    name: "幻影刺客",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/phantom_assassin_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/phantom_assassin_icon.png"
  },
  45: {
    name: "帕格纳",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/pugna_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/pugna_icon.png"
  },
  46: {
    name: "圣堂刺客",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/templar_assassin_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/templar_assassin_icon.png"
  },
  47: {
    name: "毒龙",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/viper_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/viper_icon.png"
  },
  48: {
    name: "露娜",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/luna_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/luna_icon.png"
  },
  49: {
    name: "龙骑士",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/dragon_knight_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/dragon_knight_icon.png"
  },
  50: {
    name: "戴泽",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/dazzle_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/dazzle_icon.png"
  },
  51: {
    name: "发条地精",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/rattletrap_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/rattletrap_icon.png"
  },
  52: {
    name: "受折磨的灵魂",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/leshrac_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/leshrac_icon.png"
  },
  53: {
    name: "先知",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/furion_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/furion_full_icon.png"
  },
  54: {
    name: "噬魂者",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/life_stealer_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/life_stealer_icon.png"
  },
  55: {
    name: "黑暗贤者",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/dark_seer_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/dark_seer_icon.png"
  },
  56: {
    name: "克林克兹",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/clinkz_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/clinkz_icon.png"
  },
  57: {
    name: "全能骑士",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/omniknight_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/omniknight_icon.png"
  },
  58: {
    name: "魅惑魔女",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/enchantress_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/enchantress_icon.png"
  },
  59: {
    name: "哈斯卡",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/huskar_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/huskar_icon.png"
  },
  60: {
    name: "暗夜魔王",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/night_stalker_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/night_stalker_icon.png"
  },
  61: {
    name: "育母蜘蛛",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/broodmother_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/broodmother_icon.png"
  },
  62: {
    name: "赏金猎人",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/bounty_hunter_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/bounty_hunter_icon.png"
  },
  63: {
    name: "编织者",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/weaver_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/weaver_icon.png"
  },
  64: {
    name: "双头龙",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/jakiro_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/jakiro_icon.png"
  },
  65: {
    name: "蝙蝠骑士",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/batrider_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/batrider_icon.png"
  },
  66: {
    name: "陈",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/chen_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/chen_icon.png"
  },
  67: {
    name: "幽鬼",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/spectre_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/spectre_icon.png"
  },
  68: {
    name: "远古冰魂",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/ancient_apparition_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/ancient_apparition_icon.png"
  },
  69: {
    name: "末日使者",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/doom_bringer_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/doom_bringer_icon.png"
  },
  70: {
    name: "拍拍熊",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/ursa_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/ursa_full_icon.png"
  },
  71: {
    name: "裂魂人",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/spirit_breaker_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/spirit_breaker_icon.png"
  },
  72: {
    name: "矮人直升机",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/gyrocopter_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/gyrocopter_icon.png"
  },
  73: {
    name: "炼金术士",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/alchemist_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/alchemist_icon.png"
  },
  74: {
    name: "祈求者",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/invoker_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/invoker_icon.png"
  },
  75: {
    name: "沉默术士",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/silencer_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/silencer_icon.png"
  },
  76: {
    name: "殁境神蚀者",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/obsidian_destroyer_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/obsidian_destroyer_icon.png"
  },
  77: {
    name: "狼人",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/lycan_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/lycan_icon.png"
  },
  78: {
    name: "酒仙",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/brewmaster_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/brewmaster_icon.png"
  },
  79: {
    name: "暗影恶魔",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/shadow_demon_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/shadow_demon_icon.png"
  },
  80: {
    name: "德鲁伊",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/lone_druid_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/lone_druid_icon.png"
  },
  81: {
    name: "混沌骑士",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/chaos_knight_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/chaos_knight_icon.png"
  },
  82: {
    name: "米波",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/meepo_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/meepo_icon.png"
  },
  83: {
    name: "树精卫士",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/treant_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/treant_icon.png"
  },
  84: {
    name: "食人魔法师",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/ogre_magi_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/ogre_magi_icon.png"
  },
  85: {
    name: "不朽尸王",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/undying_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/undying_icon.png"
  },
  86: {
    name: "拉比克",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/rubick_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/rubick_icon.png"
  },
  87: {
    name: "干扰者",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/disruptor_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/disruptor_icon.png"
  },
  88: {
    name: "司夜刺客",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/nyx_assassin_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/nyx_assassin_icon.png"
  },
  89: {
    name: "娜迦海妖",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/naga_siren_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/naga_siren_icon.png"
  },
  90: {
    name: "光之守卫",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/keeper_of_the_light_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/keeper_of_the_light_icon.png"
  },
  91: {
    name: "艾欧",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/wisp_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/wisp_icon.png"
  },
  92: {
    name: "维萨吉",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/visage_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/visage_icon.png"
  },
  93: {
    name: "斯拉克",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/slark_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/slark_icon.png"
  },
  94: {
    name: "美杜莎",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/medusa_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/medusa_icon.png"
  },
  95: {
    name: "巨魔战将",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/troll_warlord_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/troll_warlord_icon.png"
  },
  96: {
    name: "半人马战行者",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/centaur_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/centaur_icon.png"
  },
  97: {
    name: "马格纳斯",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/magnataur_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/magnataur_icon.png"
  },
  98: {
    name: "伐木机",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/shredder_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/shredder_icon.png"
  },
  99: {
    name: "钢背兽",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/bristleback_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/bristleback_icon.png"
  },
  100: {
    name: "巨牙海民",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/tusk_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/tusk_icon.png"
  },
  101: {
    name: "天怒法师",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/skywrath_mage_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/skywrath_mage_icon.png"
  },
  102: {
    name: "亚巴顿",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/abaddon_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/abaddonicon.png"
  },
  103: {
    name: "上古巨神",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/elder_titan_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/elder_titan_icon.png"
  },
  104: {
    name: "军团指挥官",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/legion_commander_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/legion_commander_icon.png"
  },
  105: {
    name: "工程师",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/techies_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/techies_icon.png"
  },
  106: {
    name: "灰烬之灵",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/ember_spirit_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/ember_spirit_icon.png"
  },
  107: {
    name: "大地之灵",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/earth_spirit_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/earth_spirit_icon.png"
  },
  108: {
    name: "孽主",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/abyssal_underlord_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/abyssal_underlord_icon.png"
  },
  109: {
    name: "恐怖利刃",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/terrorblade_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/terrorblade_icon.png"
  },
  110: {
    name: "凤凰",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/phoenix_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/phoenix_icon.png"
  },
  111: {
    name: "神谕者",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/oracle_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/oracle_icon.png"
  },
  112: {
    name: "寒冬飞龙",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/winter_wyvern_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/winter_wyvern_icon.png"
  },
  113: {
    name: "天穹守望者",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/arc_warden_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/arc_warden_icon.png"
  },
  114: {
    name: "齐天大圣",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/monkey_king_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/monkey_king_icon.png"
  },
  119: {
    name: "邪影芳灵",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/dark_willow_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/dark_willow_icon.png"
  },
  120: {
    name: "石鳞剑士",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/pangolier_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/pangolier_icon.png"
  },
  121: {
    name: "天涯墨客",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/grimstroke_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/grimstroke_icon.png"
  },
  123: {
    name: "森海飞霞",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/hoodwink_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/hoodwink_icon.png"
  },
  126: {
    name: "虚无之灵",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/void_spirit_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/void_spirit_icon.png"
  },
  128: {
    name: "电炎绝手",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/snapfire_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/snapfire_icon.png"
  },
  129: {
    name: "马尔斯",
    avatar:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/mars_full.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/heroes/mars_icon.png"
  },
  135: {
    name: "破晓辰星",
    avatar:
      "https://cdn.cloudflare.steamstatic.com/apps/dota2/images/dota_react/heroes/dawnbreaker.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/dota_react/heroes/icons/dawnbreaker.png"
  },
  136: {
    name: "玛茜",
    avatar:
      "https://cdn.cloudflare.steamstatic.com//apps/dota2/images/dota_react/heroes/marci.png",
    icon:
      "https://steamcdn-a.akamaihd.net/apps/dota2/images/dota_react/heroes/icons/marci.png"
  }
};

export const gameModeMap = {
  1: "全英雄选择",
  2: "队长模式",
  3: "随机征召",
  4: "单一征召",
  18: "技能征召",
  22: "全英雄选择（BP）"
};

export const lobbyTypeMap = {
  0: "普通",
  1: "练习赛",
  2: "锦标赛",
  3: "教程",
  4: "合作对抗机器人",
  5: "天体组队匹配（旧有）",
  6: "天梯单排（旧有）",
  7: "天梯",
  8: "中路对单",
  9: "勇士联赛"
};

export const partySizeMap = {
  1: "单排",
  2: "双排",
  3: "三排",
  4: "四黑",
  5: "五黑"
};

export const skillMap = {
  1: "Normal",
  2: "High",
  3: "Very High"
};

export const regionMap = {
  1: "美国西部",
  2: "美国东部",
  3: "卢森堡",
  4: "新加坡",
  5: "迪拜",
  6: "澳大利亚",
  7: "斯德哥尔摩",
  8: "奥地利",
  9: "巴西",
  10: "南非",
  11: "电信(上海)",
  12: "联通(一)",
  13: "电信(广东)",
  14: "智利",
  15: "秘鲁",
  16: "印度",
  17: "电信(广东)",
  18: "电信(浙江)",
  19: "日本",
  20: "电信(华中)",
  21: "联通(二)"
};

export const killStreakMap = {
  3: "大杀特杀",
  4: "主宰比赛",
  5: "杀人如麻",
  6: "无人能挡",
  7: "变态杀戮",
  8: "妖怪杀戮",
  9: "如神",
  10: "超神"
};

const killStreakTypeMap = {
  9: "warning",
  10: "danger"
};

export const multiKillMap = {
  2: "双杀",
  3: "三杀",
  4: "疯狂杀戮",
  5: "暴走"
};

const multiKillTypeMap = {
  4: "warning",
  5: "danger"
};

export const radiantLaneMap = {
  1: "优势路",
  2: "中路",
  3: "劣势路"
};

export const direLaneMap = {
  1: "劣势路",
  2: "中路",
  3: "优势路"
};

export function formatKillStreak(killStreaks, playerSlot) {
  if (!killStreaks) return;
  const list = [];
  for (const [key] of Object.entries(killStreaks)) {
    if (key > 10) {
      list.push({
        name: "超神",
        type: "danger",
        playerSlot
      });
    } else {
      list.push({
        name: killStreakMap[key],
        type: killStreakTypeMap[key] || "primary",
        playerSlot
      });
    }
  }
  return list[list.length - 1];
}

export function formatMultiKill(multiKill, playerSlot) {
  if (!multiKill) return;
  const list = [];
  for (const [key] of Object.entries(multiKill)) {
    list.push({
      name: multiKillMap[key],
      type: multiKillTypeMap[key] || "primary",
      playerSlot
    });
  }
  return list[list.length - 1];
}

export function formatRankTier(rankTier, leaderboardRank) {
  if (rankTier) {
    let rankTierStr = rankTier.toString();
    if (rankTierStr[0] !== "8") {
      return `${rankMap[Number(rankTierStr[0])]}${
        levelMap[Number(rankTierStr[1])]
      }`;
    } else {
      return `${rankMap[Number(rankTierStr[0])]}${leaderboardRank || ""}`;
    }
  } else {
    return "未知";
  }
}

export function isWin(playSlot, radiantWin) {
  return [0, 1, 2, 3, 4].includes(playSlot) === radiantWin;
}

export function getHeroName(heroId) {
  return heroMap[heroId]?.name || "未知英雄";
}

export function getHeroAvatar(heroID) {
  return heroMap[heroID]?.avatar || "";
}

export function getGameMode(game_mode) {
  return gameModeMap[game_mode] || "未知模式";
}

export function getLobbyType(lobby_type) {
  return lobbyTypeMap[lobby_type] || "未知";
}

export function getPartSize(party_size) {
  return partySizeMap[party_size] || "未知";
}

export function getSkillLevel(skill) {
  return skillMap[skill] || "未知";
}

export function isLadder(lobbyType) {
  return lobbyType === 7;
}

export function formatGameDuration(duration) {
  const sec = duration % 60 < 10 ? "0" + (duration % 60) : "" + (duration % 60);
  const min =
    Number((duration / 60).toFixed(0)) < 10
      ? "0" + Number((duration / 60).toFixed(0))
      : "" + Number((duration / 60).toFixed(0));
  return Number.isNaN(duration) ? "未知" : `${min}:${sec}`;
}

export function formatStartTime(start_time) {
  const nowTime = new Date().getTime();
  const timeDiff = nowTime - start_time * 1000;
  const sec = Math.floor(timeDiff / 1000);
  const min = Math.floor(timeDiff / (60 * 1000));
  const hour = Math.floor(timeDiff / (60 * 60 * 1000));
  const day = Math.floor(timeDiff / (24 * 60 * 60 * 1000));
  const mounth = Math.floor(timeDiff / (30 * 24 * 60 * 60 * 1000));
  const year = Math.floor(timeDiff / (12 * 30 * 24 * 60 * 60 * 1000));
  if (sec < 60) {
    return "刚刚";
  } else if (min >= 1 && min < 60) {
    return `${min}分钟前`;
  } else if (hour >= 1 && hour < 24) {
    return `${hour}小时前`;
  } else if (day >= 1 && day <= 30) {
    return `${day}天前`;
  } else if (mounth >= 1 && mounth < 12) {
    return `${mounth}个月前`;
  } else {
    return `${year}年前`;
  }
}

export function isRadiant(player_slot) {
  return [0, 1, 2, 3, 4].includes(player_slot);
}

export function getRegion(region) {
  return regionMap[region] || "未知";
}

export function getLane(player_slot, lane) {
  return isRadiant(player_slot)
    ? radiantLaneMap[lane] || "未知"
    : direLaneMap[lane] || "未知";
}

export function getHeroIcon(heroID) {
  return heroMap[heroID].icon;
}

export function getMaxHeroIdInListByKey(list, key) {
  if (!Array.isArray(list)) return null;
  if (list.length === 0) return null;
  let max = {
    num: list[0][key],
    heroID: list[0]["hero_id"]
  };
  for (let i = 0; i < list.length; i++) {
    if (max.num < list[i][key]) {
      max = {
        num: list[i][key],
        heroID: list[i]["hero_id"]
      };
    }
  }
  return getHeroIcon(max.heroID);
}

export function getMaxMatchIdInListByKey(list, key) {
  let max = {
    num: list[0][key],
    match_id: list[0]["match_id"]
  };
  for (let i = 0; i < list.length; i++) {
    if (max.num < list[i][key]) {
      max = {
        num: list[i][key],
        match_id: list[i]["match_id"]
      };
    }
  }
  return max.match_id;
}

export function getKdaInList(list) {
  let killCount = 0;
  let assistsCount = 0;
  let deathCount = 0;
  for (let i = 0; i < list.length; i++) {
    killCount += list[i].kills;
    assistsCount += list[i].assists;
    deathCount += list[i].deaths;
  }
  return Math.round((killCount + assistsCount) / (deathCount || 1));
}

function getMaxInList(list) {
  if (list.length === 0) return "未知";
  let max = list[0];
  for (let i = 0; i < list.length; i++) {
    if (list[i].count > max.count) {
      max = list[i];
    }
  }
  return max.name;
}

export function getLaneInList(list) {
  let laneList = [];
  for (let i = 0; i < list.length; i++) {
    if (
      laneList.find(item => {
        return item.name === list[i].lane;
      })
    ) {
      let index = laneList.findIndex(item => {
        return item.name === list[i].lane;
      });
      laneList[index].count += 1;
    } else {
      laneList.push({
        name: list[i].lane,
        count: 1
      });
    }
  }
  const maxLane = getMaxInList(laneList);
  return radiantLaneMap[maxLane] || "未知";
}

export function getWinAverageInList(list) {
  let averageMap = {
    win: 0,
    lose: 0
  };
  for (let i = 0; i < list.length; i++) {
    if ((isWin(list[i].player_slot), list[i].radiant_win)) {
      averageMap.win++;
    } else {
      averageMap.lose++;
    }
  }
  return `${(
    (averageMap.win * 100) /
    (averageMap.win + averageMap.lose)
  ).toFixed(1)}%`;
}
